package chap01;

class DemoThread extends Thread {

    @Override
    public void run() {
        System.out.println("当前线程运行状态：" + this.isAlive());
    }
}

public class Demo1 {
    public static void main(String[] args) {
        DemoThread t = new DemoThread();
        t.isAlive();
        System.out.println("当前线程运行状态：" + t.isAlive());
        t.start();
        try {
            Thread.sleep(1000L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("当前线程运行状态：" + t.isAlive());

    }
}
